import request from '@/utils/request'

// 查询辅料库存列表
export function listAuxiliary(query) {
  return request({
    url: '/mes/auxiliary/list',
    method: 'get',
    params: query
  })
}

// 查询辅料库存详细
export function getAuxiliary(id) {
  return request({
    url: '/mes/auxiliary/' + id,
    method: 'get'
  })
}

// 新增辅料库存
export function addAuxiliary(data) {
  return request({
    url: '/mes/auxiliary',
    method: 'post',
    data: data
  })
}

// 修改辅料库存
export function updateAuxiliary(data) {
  return request({
    url: '/mes/auxiliary',
    method: 'put',
    data: data
  })
}

// 删除辅料库存
export function delAuxiliary(id) {
  return request({
    url: '/mes/auxiliary/' + id,
    method: 'delete'
  })
}

export function listByAuxiliaryType(data) {
  return request({
    url: '/mes/auxiliary/listByAuxiliaryType',
    method: 'post',
    data: data
  })
}